package com.mike.controller;

import com.mike.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Date 2021/11/29 16:24
 * @Created by mike
 */
@RestController
@RequestMapping("email")
public class MailController {
    @Autowired
    private MailService mailService;

    @GetMapping("/{code}/{mail}")
    public Boolean sendMail(@PathVariable String code,@PathVariable String mail){
        return mailService.sendAuthCode(code,mail);
    }
}
